Remove unnecessary simulated test duration - #5937
Draft
mpkorstanje wants to merge 1 commit into
Draft
Conversation
The count-down latch releases either the moment all threads have reached the latch or when the simulated duration has passed. In this case the simulated duration acts like timeout and isn't nessesary, in normal circumstances the latch will release wll before that time has passed. The only exception here was the `IsolatedTestCase` which requires two threads to unlock its count-down latch. This isn't possible, isolated tests are all executed on the same thread. This test would always time out. The Timeout at test level takes care of any actual time-outs due to programming errors.
🚨 TestLens detected 144 failed tests 🚨Here is what you can do:
Test SummaryCI / Build / Linux > :platform-tests:test
CI / Build / Windows > :platform-tests:test
CI / Build / macOS > :platform-tests:test
CI / Cross-Version / OpenJ9 25 > :platform-tests:test
CI / Cross-Version / OpenJDK 26 (ga) > :platform-tests:test
CI / Cross-Version / OpenJDK 27 (ea) > :platform-tests:test
CI / Cross-Version / OpenJDK 27 (valhalla) > :platform-tests:test
CI / Cross-Version / OpenJDK 28 (ea) > :platform-tests:test
🏷️ Commit: 2e1c1eb Test Failures (first 10 of 448)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherAcrossClassesWithOtherResourceLocks() > repetition 1 of 10 (:platform-tests:test in CI / Build / Linux)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherAcrossClassesWithOtherResourceLocks() > repetition 2 of 10 (:platform-tests:test in CI / Build / Linux)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherWhenDeclaredOnMethodLevel(Class) > [1] testClass = class org.junit.platform.engine.support.hierarchical.ParallelExecutionIntegrationTests$IsolatedMethodFirstTestCase (:platform-tests:test in CI / Build / Linux)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherWhenDeclaredOnMethodLevel(Class) > [1] testClass = class org.junit.platform.engine.support.hierarchical.ParallelExecutionIntegrationTests$IsolatedMethodFirstTestCase (:platform-tests:test in CI / Build / Linux)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherWhenDeclaredOnMethodLevel(Class) > [1] testClass = class org.junit.platform.engine.support.hierarchical.ParallelExecutionIntegrationTests$IsolatedMethodFirstTestCase (:platform-tests:test in CI / Build / Linux)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherWhenDeclaredOnMethodLevel(Class) > [2] testClass = class org.junit.platform.engine.support.hierarchical.ParallelExecutionIntegrationTests$IsolatedMethodLastTestCase (:platform-tests:test in CI / Build / Linux)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherWhenDeclaredOnMethodLevel(Class) > [2] testClass = class org.junit.platform.engine.support.hierarchical.ParallelExecutionIntegrationTests$IsolatedMethodLastTestCase (:platform-tests:test in CI / Build / Linux)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherWhenDeclaredOnMethodLevel(Class) > [2] testClass = class org.junit.platform.engine.support.hierarchical.ParallelExecutionIntegrationTests$IsolatedMethodLastTestCase (:platform-tests:test in CI / Build / Linux)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherWhenDeclaredOnMethodLevel(Class) > [3] testClass = class org.junit.platform.engine.support.hierarchical.ParallelExecutionIntegrationTests$IsolatedNestedMethodFirstTestCase (:platform-tests:test in CI / Build / Linux)ParallelExecutionIntegrationTests > [1] executorServiceType = FORK_JOIN_POOL > canRunTestsIsolatedFromEachOtherWhenDeclaredOnMethodLevel(Class) > [3] testClass = class org.junit.platform.engine.support.hierarchical.ParallelExecutionIntegrationTests$IsolatedNestedMethodFirstTestCase (:platform-tests:test in CI / Build / Linux)Muted Tests (first 20 of 160)Select tests to mute in this pull request:
Reuse successful test results:
Click the checkbox to trigger a rerun:
Learn more about TestLens at testlens.app. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The count-down latch releases either the moment all threads have reached the latch or when the simulated duration has passed. In this case the simulated duration acts like timeout and isn't necessary, in normal circumstances the latch will release wll before that time has passed.
The only exception here was the
IsolatedTestCasewhich requires two threads to unlock its count-down latch. This isn't possible, isolated tests are all executed on the same thread. This test would always time out.The Timeout at test level takes care of any actual time-outs due to programming errors.
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@APIannotations